<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<MVCWeb.Models.Event>>" %>
<%@ Register Src="~/Views/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="mmuc" %>
<%@ Register Src="~/Views/Shared/LogOnUserControl.ascx" TagName="LogOnUserControl" TagPrefix="louc" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<title>Index of Events</title>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    

    <louc:LogOnUserControl ID="LogOnUserControl1" runat="server" />
    <!-- BEGIN: MainMenu -->
    <mmuc:MainMenu ID="MainMenu1" runat="server" />
    <!-- END: MainMenu -->
    <br />
    <br />
    <table cellpadding="4" cellspacing="1" border="0" width="100%" class="DataTable">
        <tr>
            <th></th>
            <th>
                Event Type
            </th>
            <th>
                Name
            </th>
            <th>
                Event Date
            </th>
            <th>
                Active
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new {  id=item.EventId }) %><br />
                <%= Html.ActionLink("EventAttendant", "EventAttendant", new { id = item.EventId })%><br />
                <%= Html.ActionLink("ManageGallery", "ManageGallery", new { id = item.EventId })%>
            </td>
            <td>
                <%= Html.Encode(item.EventType) %>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
            <td>
                <%= Html.Encode(item.EventDate.Value.ToShortDateString()) %>
            </td>
            <td>
                <%= Html.Encode(item.Active) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

